home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / auctex / Makefile.z / Makefile
Encoding:
Makefile  |  1998-05-21  |  7.6 KB  |  232 lines

  1. # Makefile - for the AUC TeX distribution.
  2. #
  3. # Maintainer: Per Abrahamsen <auc-tex@sunsite.auc.dk>
  4. # Version: 9.7p
  5. #
  6. # Edit the makefile, type `make', and follow the instructions.
  7.  
  8. ##----------------------------------------------------------------------
  9. ##  YOU MUST EDIT THE FOLLOWING LINES 
  10. ##----------------------------------------------------------------------
  11.  
  12. # Where local software is found
  13. prefix=/usr/local
  14.  
  15. # Where info files go.
  16. infodir = $(prefix)/info
  17.  
  18. # Where local lisp files go.
  19. lispdir = $(prefix)/share/emacs/site-lisp
  20.  
  21. # Where the AUC TeX emacs lisp files go.
  22. aucdir=$(lispdir)/auctex
  23.  
  24. # Name of your emacs binary
  25. EMACS=emacs
  26.  
  27. ##----------------------------------------------------------------------
  28. ## YOU MAY NEED TO EDIT THESE
  29. ##----------------------------------------------------------------------
  30.  
  31. # Do not change the definition of autodir below, unless you also
  32. # update TeX-auto-global in tex-init.el
  33.  
  34. # Where the automatically generated lisp files for your site go.
  35. autodir=$(aucdir)/auto
  36.  
  37. # Using emacs in batch mode.
  38. BATCH=$(EMACS) -batch -q -l lpath.el
  39.  
  40. # Specify the byte-compiler for compiling AUC TeX files
  41. ELC= $(BATCH) -f batch-byte-compile
  42.  
  43. # Specify the byte-compiler for generating style files
  44. AUTO= $(EMACS) -batch -l $(aucdir)/tex.elc \
  45.     -l $(aucdir)/latex.elc -f TeX-auto-generate-global
  46.  
  47. # Specify the byte-compiler for compiling generated style files
  48. AUTOC= $(ELC)
  49.  
  50. # How to move the byte compiled files to their destination.  
  51. MV = mv
  52.  
  53. # How to copy the lisp files to their distination.
  54. CP = cp -p
  55.  
  56. ##----------------------------------------------------------------------
  57. ##  BELOW THIS LINE ON YOUR OWN RISK!
  58. ##----------------------------------------------------------------------
  59.  
  60. .SUFFIXES: .el .elc .texi 
  61.  
  62. SHELL = /bin/sh
  63.  
  64. FTPDIR = /home/ftp/pub/Staff/Per.Abrahamsen/auctex
  65. #FTPDIR = /home/ftp/pub/Staff/Per.Abrahamsen/mirror/ftp/auctex
  66.  
  67. WWWDIR = $(HOME)/.public_html/auctex
  68. #WWWDIR = /home/ftp/pub/Staff/Per.Abrahamsen/mirror/www/auctex
  69.  
  70. REMOVE =  ltx-help.el
  71.  
  72. MINMAPSRC = auc-menu.el maniac.el outln-18.el all.el multi-prompt.el
  73.  
  74. ## MULE_ELC is set by update-elc.sh if bytecompiling for XEmacs/Mule
  75. CONTRIB = bib-cite.el $(MULE_EL) font-latex.el custom-load.el
  76. CONTRIBELC = bib-cite.elc $(MULE_ELC) font-latex.elc custom-load.elc
  77.  
  78. AUCSRC = auc-old.el tex.el tex-buf.el latex.el tex-info.el multi-prompt.el
  79. AUCELC = auc-old.elc tex.elc tex-buf.elc latex.elc tex-info.elc \
  80.     multi-prompt.elc
  81.  
  82.  
  83. STYLESRC = ../../etc/auctex/style/slides.el    ../../etc/auctex/style/foils.el    ../../etc/auctex/style/amstex.el \
  84.        ../../etc/auctex/style/article.el   ../../etc/auctex/style/book.el     ../../etc/auctex/style/letter.el \
  85.        ../../etc/auctex/style/report.el    ../../etc/auctex/style/amsart.el   ../../etc/auctex/style/amsbook.el \
  86.        ../../etc/auctex/style/epsf.el      ../../etc/auctex/style/psfig.el    ../../etc/auctex/style/latexinfo.el \
  87.        ../../etc/auctex/style/dutch.el     ../../etc/auctex/style/german.el   ../../etc/auctex/style/dk.el \
  88.        ../../etc/auctex/style/j-article.el ../../etc/auctex/style/j-book.el   ../../etc/auctex/style/j-report.el \
  89.        ../../etc/auctex/style/jarticle.el  ../../etc/auctex/style/jbook.el    ../../etc/auctex/style/jreport.el \
  90.        ../../etc/auctex/style/dinbrief.el  ../../etc/auctex/style/virtex.el   ../../etc/auctex/style/plfonts.el \
  91.        ../../etc/auctex/style/plhb.el      ../../etc/auctex/style/harvard.el    ../../etc/auctex/style/swedish.el \
  92.        ../../etc/auctex/style/danish.el
  93.  
  94. DOCFILES = doc/Makefile doc/auc-tex.texi doc/intro.texi doc/install.texi \
  95.     doc/changes.texi doc/tex-ref.tex doc/math-ref.tex doc/history.texi
  96.  
  97. EXTRAFILES = COPYING PROBLEMS MSDOS VMS OS2 WIN-NT Makefile ChangeLog \
  98.     lpath.el tex-site.el $(CONTRIB)
  99.  
  100. all:    lisp
  101.  
  102. .POSIX:
  103.  
  104. .IGNORE: some
  105.  
  106. lisp:
  107.     $(ELC) $(AUCSRC) $(STYLESRC) $(CONTRIB)
  108.  
  109. some:    $(AUCELC) $(CONTRIBELC) $(STYLESRC:.el=.elc)
  110.  
  111. install:    install-lisp
  112.  
  113. contrib:
  114.     $(ELC) bib-cite.el
  115.     $(ELC) font-latex.el
  116. #     $(ELC) tex-jp.el              # Doesn't compile without MULE
  117. #     $(ELC) hilit-LaTeX.el         # Doesn't compile without X
  118.  
  119. install-lisp:    some
  120.     if [ ! -d $(lispdir) ]; then mkdir $(lispdir); else true; fi ;
  121.     if [ -f $(lispdir)/tex-site.el ]; \
  122.     then \
  123.         echo "Leaving old tex-site.el alone."; \
  124.     else \
  125.         sed -e 's#@AUCDIR#$(aucdir)/#' tex-site.el \
  126.         > $(lispdir)/tex-site.el ; \
  127.         fi
  128.     if [ ! -d $(aucdir) ]; then mkdir $(aucdir); else true; fi ; 
  129.     if [ `/bin/pwd` != `(cd $(aucdir) && /bin/pwd)` ] ; \
  130.     then \
  131.         if [ ! -d $(aucdir)/style ]; then mkdir $(aucdir)/style; \
  132.                                      else true; fi ; \
  133.         $(MV) $(AUCELC) $(aucdir) ; \
  134.         $(MV) style/*.elc $(aucdir)/style ; \
  135.         $(CP) $(AUCSRC) $(aucdir) ; \
  136.         $(CP) style/*.el $(aucdir)/style ; \
  137.     else \
  138.         echo "Leaving compiled files in place."; \
  139.     fi
  140.  
  141. install-contrib:
  142.     $(MV) $(CONTRIBELC) $(aucdir)
  143.     $(CP) $(CONTRIB) $(aucdir)
  144.  
  145. install-info:
  146.     -(cd doc; $(MAKE) install infodir=$(infodir))
  147.  
  148.  
  149. install-auto:
  150.     @echo "Use \"M-x TeX-auto-generate-global RET\" instead."
  151.  
  152.  
  153. .el.elc:
  154.     $(ELC) $<
  155.  
  156. clean:
  157.     rm -rf *~ #*# lex.yy.c idetex auctex
  158.     (cd doc; $(MAKE) clean)
  159.  
  160. wc:
  161.     wc $(AUCSRC) $(STYLESRC) 
  162.  
  163. dist:    
  164.     @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  165.     if [ "X$(OLD)" = "X" ]; then echo "No patch"; exit 1; fi
  166.     @echo "**********************************************************"
  167.     @echo "** Making distribution of auctex for release $(TAG)"
  168.     @echo "**********************************************************"
  169.     if [ -d auctex-$(TAG) ]; then rm -r auctex-$(TAG) ; fi
  170.     rm -f $(WWWDIR)/version
  171.     echo $(TAG) > $(WWWDIR)/version
  172.     perl -pi.bak -e "s/Version: $(OLD)/Version: $(TAG)/" \
  173.         $(AUCSRC) $(EXTRAFILES)
  174.     mv ChangeLog ChangeLog.old
  175.     echo `date "+%a %b %d %T %Y "` \
  176.          " Per Abrahamsen  <abraham@dina.kvl.dk>" > ChangeLog
  177.     echo >> ChangeLog
  178.     echo "    * Version" $(TAG) released. >> ChangeLog
  179.     echo >> ChangeLog
  180.     cat ChangeLog.old >> ChangeLog
  181.     cvs commit -m "Release $(OLD)++" tex.el
  182.     rm -f tex.el.orig
  183.     mv tex.el tex.el.orig
  184.     sed -e '/defconst AUC-TeX-date/s/"[^"]*"/"'"`date`"'"/' \
  185.         -e '/defconst AUC-TeX-version/s/"[^"]*"/"'$(TAG)'"/' \
  186.         < tex.el.orig > tex.el
  187.     rm -f $(REMOVE) 
  188.     -cvs remove $(REMOVE) 
  189.     -cvs add $(AUCSRC) $(EXTRAFILES)
  190.     -(cd doc; cvs add `echo $(DOCFILES) | sed -e s@doc/@@g` )
  191.     -(cd style; cvs add `echo $(STYLESRC) | sed -e s@style/@@g` )
  192.     cvs commit -m "Release $(TAG)"
  193.     cvs tag release_`echo $(TAG) | sed -e 's/[.]/_/g'`
  194.     mkdir auctex-$(TAG) 
  195.     mkdir auctex-$(TAG)/style
  196.     mkdir auctex-$(TAG)/doc 
  197.     cp $(AUCSRC) $(EXTRAFILES) auctex-$(TAG)
  198.     cp $(STYLESRC) auctex-$(TAG)/style
  199.     cp $(DOCFILES)  auctex-$(TAG)/doc
  200.     (cd doc; $(MAKE) dist; cp auctex auctex-* ../auctex-$(TAG)/doc )
  201.     (cd doc; cp INSTALLATION README CHANGES ../auctex-$(TAG)/ )
  202.     cp doc/CHANGES $(FTPDIR)/CHANGES-$(TAG)
  203.     cp doc/auc-tex.ps $(FTPDIR)
  204.     cp ChangeLog $(FTPDIR)
  205.     cp doc/*.html $(WWWDIR)/doc
  206.     rm -f $(FTPDIR)/auctex-$(TAG).tar.gz $(FTPDIR)/auctex.tar.gz
  207.     rm -f $(FTPDIR)/auctex.tar.Z $(FTPDIR)/auctex.zip
  208.     tar -cf - auctex-$(TAG) | gzip --best > $(FTPDIR)/auctex-$(TAG).tar.gz
  209.     tar -cf - auctex-$(TAG) | compress > $(FTPDIR)/auctex.tar.Z
  210.     zip -r $(FTPDIR)/auctex auctex-$(TAG)
  211.     (cd $(FTPDIR); ln -s auctex-$(TAG).tar.gz auctex.tar.gz)
  212.     cvs rdiff -r release_`echo $(OLD) | sed -e 's/[.]/_/g'` \
  213.               -r release_`echo $(TAG) | sed -e 's/[.]/_/g'` auctex \
  214.         > $(FTPDIR)/auctex-$(OLD)-to-$(TAG).patch ;  exit 0
  215.  
  216. patch:
  217.     cvs rdiff -r release_`echo $(OLD) | sed -e 's/[.]/_/g'` \
  218.               -r release_`echo $(TAG) | sed -e 's/[.]/_/g'` auctex
  219.  
  220. min-map:
  221.     -cvs add $(MINMAPSRC) 
  222.     cvs commit -m "Update"
  223.     cp $(MINMAPSRC) doc/math-ref.tex $(FTPDIR) 
  224.  
  225. autoloads: auto-autoloads.el
  226.  
  227. auto-autoloads.el: $(AUCSRC) $(CONTRIB)
  228.     $(EMACS) -batch -q -no-site-file \
  229.         -eval '(setq autoload-target-directory "'`pwd`'/")' \
  230.         -l autoload \
  231.         -f batch-update-autoloads $?
  232.